home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkTickMarks.h.z / VkTickMarks.h
Encoding:
C/C++ Source or Header  |  1996-09-20  |  2.5 KB  |  61 lines

  1. ////////////////////////////////////////////////////////////////////////////////
  2. ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
  3. //                                                                            //
  4. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
  5. // the contents of this file may not be disclosed to third parties, copied    //
  6. // or duplicated in any form, in whole or in part, without the prior written  //
  7. // permission of Silicon Graphics, Inc.                                       //
  8. //                                                                            //
  9. // RESTRICTED RIGHTS LEGEND:                                                  //
  10. // Use,duplication or disclosure by the Government is subject to restrictions //
  11. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
  12. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
  13. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
  14. // rights reserved under the Copyright Laws of the United States.             //
  15. //                                                                            //
  16. ////////////////////////////////////////////////////////////////////////////////
  17. #ifndef VKTICKMARKS_H
  18. #define VKTICKMARKS_H
  19.  
  20. #include <Vk/VkComponent.h>
  21.  
  22. class VkTickMarks : public VkComponent {
  23.  
  24.   public:
  25.  
  26.     VkTickMarks(const char *name, Widget parent, Boolean labelsToLeft = True,
  27.         Boolean noLabels = False, Boolean centerLabels = False);
  28.     ~VkTickMarks();
  29.     
  30.     virtual const char* className();
  31.     
  32.     void setScale(int min, int max, int majorInterval, int minorInterval);
  33.     void setMargin(int marginTop, int marginBottom);
  34.     
  35.     int labelSpacing() { return _labelSpacing; }
  36.     void addLabel(int value);
  37.     static VkComponent *CreateVkTickMarks(const char *name, Widget parent);
  38.     
  39.   protected:
  40.  
  41.     void adjustWidth();
  42.     void draw();
  43.     
  44.     static void expose_stub(Widget w, XtPointer clientData, XtPointer callData);
  45.     static void resize_stub(Widget w, XtPointer clientData, XtPointer callData);
  46.     
  47.     Pixel _fg, _bg;
  48.     XmFontList _fontList;
  49.     GC _gc;
  50.     int _min, _max, _majorInt, _minorInt;
  51.     int _majorSize, _minorSize, _labelSpacing;
  52.     int _marginTop, _marginBottom, _lineThickness;
  53.     Boolean _labelsToLeft, _connectTicks, _noLabels, _centerLabels;
  54.     Boolean _signedLabels;
  55.     XFontStruct *_fs;
  56.     int *_labels;
  57.     int _numLabels, _sizeLabels;
  58. }; 
  59.  
  60. #endif
  61.